package com.ruoyi.user.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.hibernate.validator.constraints.Length;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Pattern;

/**
 * 账号管理对象 user
 *
 * @author ruoyi
 * @date 2024-06-06
 */
@Validated
public class User extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 身份 */
    @Excel(name = "身份")
    private Long idcard;

    @Excel(name = "学校")
    @Length(min = 1,max = 12,message = "请输入学校")
    private String school;

    /** 姓名 */
    @Excel(name = "姓名")
    @Length(min = 1,max = 10,message = "请输入姓名")
    private String name;

    /** 报名组别 */

    @Excel(name = "报名组别")
    private Long idgroup;

    /** 账号名 */
    @Excel(name = "账号名")
    @Pattern(regexp = "^\\S{5,16}$")
    private String number;

    /** 密码 */
    @Pattern(regexp = "^\\S{5,16}$")
    private String password;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setIdcard(Long idcard)
    {
        this.idcard = idcard;
    }

    public Long getIdcard()
    {
        return idcard;
    }
    public void setSchool(String school)
    {
        this.school = school;
    }

    public String getSchool()
    {
        return school;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setIdgroup(Long idgroup)
    {
        this.idgroup = idgroup;
    }

    public Long getIdgroup()
    {
        return idgroup;
    }
    public void setNumber(String number)
    {
        this.number = number;
    }

    public String getNumber()
    {
        return number;
    }
    public void setPassword(String password)
    {
        this.password = password;
    }

    public String getPassword()
    {
        return password;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("idcard", getIdcard())
                .append("school", getSchool())
                .append("name", getName())
                .append("idgroup", getIdgroup())
                .append("number", getNumber())
                .append("password", getPassword())
                .toString();
    }
}
